import config from "@/config"
import http from "@/utils/request"

export default {
	//仓库
	ware:{
		lists: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/lists`,
			name: "获取仓库列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/edit`,
			name: "修改仓库",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/add`,
			name: "添加仓库",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/delete`,
			name: "删除仓库",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		update_status: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/update_status`,
			name: "修改仓库状态",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		update_default: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/update_default`,
			name: "修改仓库默认",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	//供应商
	apply:{
		lists: {
			url: `${config.API_URL}/adminapi/shop.shop_apply/lists`,
			name: "获取供应商列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.shop_apply/edit`,
			name: "修改供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shop_apply/add`,
			name: "添加供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shop_apply/delete`,
			name: "删除供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		deleteAll: {
			url: `${config.API_URL}/adminapi/shop.shop_apply/deleteAll`,
			name: "删除供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		update_status: {
			url: `${config.API_URL}/adminapi/shop.shop_apply/update_status`,
			name: "修改供应商状态",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	//供应商
	applyCate:{
		edit: {
			url: `${config.API_URL}/adminapi/shop.shop_apply_cate/edit`,
			name: "修改供应商分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shop_apply_cate/add`,
			name: "添加供应商分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shop_apply_cate/delete`,
			name: "删除供应商分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		all: {
			url: `${config.API_URL}/adminapi/shop.shop_apply_cate/all`,
			name: "获取所有供应商分类",
			get: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	//供应商
	client:{
		lists: {
			url: `${config.API_URL}/adminapi/shop.shop_client/lists`,
			name: "获取客户列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.shop_client/edit`,
			name: "修改客户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shop_client/add`,
			name: "添加客户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shop_client/delete`,
			name: "删除客户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		deleteAll: {
			url: `${config.API_URL}/adminapi/shop.shop_client/deleteAll`,
			name: "删除客户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		update_status: {
			url: `${config.API_URL}/adminapi/shop.shop_client/update_status`,
			name: "修改客户状态",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	//客户分类
	clientCate:{
		edit: {
			url: `${config.API_URL}/adminapi/shop.shop_client_cate/edit`,
			name: "修改客户分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shop_client_cate/add`,
			name: "添加客户分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shop_client_cate/delete`,
			name: "删除客户分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		all: {
			url: `${config.API_URL}/adminapi/shop.shop_client_cate/all`,
			name: "获取所有客户分类",
			get: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	//供应商
	linkman:{
		lists: {
			url: `${config.API_URL}/adminapi/shop.shop_client_linkman/lists`,
			name: "获取联系人列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.shop_client_linkman/edit`,
			name: "修改联系人",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shop_client_linkman/add`,
			name: "添加联系人",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shop_client_linkman/delete`,
			name: "删除联系人",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		update_status: {
			url: `${config.API_URL}/adminapi/shop.shop_client_linkman/update_status`,
			name: "修改联系人状态",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
}
